package com.haikesi.api.menuauthority.dao;

import com.haikesi.api.menuauthority.domain.po.MenuAuthorityPO;
import com.haikesi.api.menuauthority.domain.vo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface MenuAuthorityDao extends Mapper<MenuAuthorityPO> {
    List<MenuAuthorityVO> getList(MenuAuthoritySearchVO searchVO);

    int getNextMenuCount(@Param("id") String id);

    void deleteMenu(@Param("id") String id);

    /**
     * 查询树形菜单
     * @param searchVO
     * @return
     */
    List<MenuAuthorityTreeVO> getTreeList(MenuAuthorityTreeSearchVO searchVO);

    /**
     * 删除下级菜单
     * @param parentId
     */
    void deleteByParentId(@Param("parentId") String parentId);




}